package com.liaogui.web;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.concurrent.TimeUnit;

/**
 * @author liaogui
 * @date 2025/1/17 16:48
 */
@RestController
@RequestMapping("/bitMap/")
public class BitMapController {
    @Autowired
    private RedisTemplate<String, Object> redisTemplate;

    // 初始化BitMap
    @RequestMapping("/initBitMap")
    public String initBitMap() {
        redisTemplate.opsForValue().set("bitMap:test", "1", 60, TimeUnit.SECONDS);
        return "success";
    }

}
